<template>
  <div class="sys-header" :class="{ is_doc: isDoc }">
    <div class="sys-title" @click.stop="onLogoClick">
      <img class="logo-img" src="@images/home/LOGO.png" alt="" />
    </div>
    <div v-if="$slots.default" class="content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SysHeader',
  emits: ['logo-click'],
  computed: {
    isDoc() {
      return ['privacyPolicy', 'serviceAgreement'].includes(this.$route.name)
    },
  },
  mounted() {},
  methods: {
    onLogoClick() {
      this.$emit('logo-click')
    },
  },
}
</script>

<style lang="scss" scoped>
.sys-header {
  padding: 0 20px;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: flex-start;
  box-shadow: 0px 2px 14px 1px rgba(67, 71, 74, 0.15);
  background-color: #fff;
  align-items: center;

  .sys-title {
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    .logo-img {
      display: inline-block;
      // height: 72px;
      object-fit: scale-down;
    }
  }
  .right {
    flex: 1;
    overflow: hidden;
  }
}
.is_doc {
  background-image: url('../assets/images/home/header.png');
}
</style>
